{"ast":null,"code":"var _jsxFileName = \"/data/messenger.client/src/components/Toggle/index.tsx\",\n  _s = $RefreshSig$();\nimport React from \"react\";\nimport { ToggleItem } from \"../index\";\nimport { svgProfile, svgDialogs, svgContact, svgExit, svgPlus } from \"../../assets\";\nimport { Context } from \"../../index\";\nimport { browserRouteHome } from \"../../routes\";\nimport classNames from \"classnames\";\nimport './Toggle.scss';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\nconst Toggle = () => {\n  _s();\n  const {\n    store\n  } = React.useContext(Context);\n  const [status, setStatus] = React.useState(false);\n  return /*#__PURE__*/_jsxDEV(\"div\", {\n    className: \"toggle__sidebar\",\n    children: [/*#__PURE__*/_jsxDEV(\"button\", {\n      className: classNames(\"toggle__sidebar__switch\", {\n        \"toggle__sidebar__switch--status\": status\n      }),\n      onClick: () => setStatus(!status),\n      style: {\n        backgroundImage: `url(${svgPlus})`\n      }\n    }, void 0, false, {\n      fileName: _jsxFileName,\n      lineNumber: 15,\n      columnNumber: 13\n    }, this), status && /*#__PURE__*/_jsxDEV(\"div\", {\n      className: \"toggle__sidebar-container\",\n      children: [/*#__PURE__*/_jsxDEV(ToggleItem, {\n        name: 'Профиль',\n        svgUrl: svgProfile\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 22,\n        columnNumber: 21\n      }, this), /*#__PURE__*/_jsxDEV(ToggleItem, {\n        name: 'Диалоги',\n        svgUrl: svgDialogs,\n        link: browserRouteHome\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 23,\n        columnNumber: 21\n      }, this), /*#__PURE__*/_jsxDEV(ToggleItem, {\n        name: 'Контакты',\n        svgUrl: svgContact\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 24,\n        columnNumber: 21\n      }, this), /*#__PURE__*/_jsxDEV(ToggleItem, {\n        name: 'Выйти',\n        svgUrl: svgExit,\n        onClick: () => store.logout()\n      }, void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 25,\n        columnNumber: 21\n      }, this)]\n    }, void 0, true, {\n      fileName: _jsxFileName,\n      lineNumber: 21,\n      columnNumber: 17\n    }, this)]\n  }, void 0, true, {\n    fileName: _jsxFileName,\n    lineNumber: 14,\n    columnNumber: 9\n  }, this);\n};\n_s(Toggle, \"kKRTu6n8PdHPriX4c3qsXD4VsJY=\");\n_c = Toggle;\nexport default Toggle;\nvar _c;\n$RefreshReg$(_c, \"Toggle\");","map":{"version":3,"names":["React","ToggleItem","svgProfile","svgDialogs","svgContact","svgExit","svgPlus","Context","browserRouteHome","classNames","Toggle","store","useContext","status","setStatus","useState","backgroundImage","logout"],"sources":["/data/messenger.client/src/components/Toggle/index.tsx"],"sourcesContent":["import React from \"react\";\nimport {ToggleItem} from \"../index\";\nimport {svgProfile, svgDialogs, svgContact, svgExit, svgPlus} from \"../../assets\";\nimport {Context} from \"../../index\";\nimport {browserRouteHome} from \"../../routes\";\nimport classNames from \"classnames\";\nimport './Toggle.scss';\n\nconst Toggle = () => {\n    const {store} = React.useContext(Context);\n    const [status, setStatus] = React.useState<boolean>(false);\n\n    return (\n        <div className=\"toggle__sidebar\">\n            <button className={classNames(\"toggle__sidebar__switch\",\n                {\"toggle__sidebar__switch--status\": status})}\n                    onClick={() => setStatus(!status)}\n                    style={{backgroundImage: `url(${svgPlus})`}}\n            />\n            {(status &&\n                <div className=\"toggle__sidebar-container\">\n                    <ToggleItem name={'Профиль'} svgUrl={svgProfile} />\n                    <ToggleItem name={'Диалоги'} svgUrl={svgDialogs} link={browserRouteHome}/>\n                    <ToggleItem name={'Контакты'} svgUrl={svgContact} />\n                    <ToggleItem name={'Выйти'} svgUrl={svgExit} onClick={() => store.logout()} />\n                </div>\n            )}\n        </div>\n    );\n}\n\nexport default Toggle;"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAQC,UAAU,QAAO,UAAU;AACnC,SAAQC,UAAU,EAAEC,UAAU,EAAEC,UAAU,EAAEC,OAAO,EAAEC,OAA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